package com.sataruliuxing.srpingmvc.controller;

import com.sataruliuxing.srpingmvc.user.User;
import org.springframework.http.RequestEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Title: ControllerTest
 * Description: TODO
 *
 * @author gejx
 * @version V1.0
 * @date 2021-12-09
 */
@Controller
public class ControllerTest {

    @RequestMapping(value = "/a",params = {"username=123456","password=123"})
    public String reqMapper1(@RequestBody String a,User user){
        System.out.println(a);
       return"a";
    }

    @RequestMapping("/")
    public String index(){
        return "index";
    }
    @RequestMapping("/b")
    public String reqMapper2(RequestEntity<String> entity){
        System.out.println(entity.getHeaders());
        return "index";
    }
}
